#!/usr/bin/env ruby

# script to set up a rails-friendly svn environment
# you must have checked out from a svn repository
#
# by Marshall Weir - mgodATumichDOTedu
#
# basic process outlined by wiki.rubyonrails.org
# http://wiki.rubyonrails.org/rails/pages/HowtoUseRailsWithSubversion



puts "\ncontacting repository...\n" 
`svn update`

`svn remove log/*`
puts `svn commit -m "removing log files from subversion"`

puts "\nIgnoring log files\n" 
puts `svn propset svn:ignore "*log" log/`
`svn update log/`

puts "\nignoring files in /log/ ending in log\n"
`svn commit -m "Ignoring .log files"`

puts "\nIgnoring files in /tmp/"
`svn propset svn:ignore * tmp/sessions/ tmp/cache/ tmp/sockets/`

puts "\n" + `svn commit -m "Ignoring /tmp/"` 

`svn remove tmp/*`
`svn propset svn:ignore "*" tmp/`
`svn update tmp/`

puts "\n" + `svn commit -m "Ignoring /tmp/*"`

puts "\nfinished.\n"